/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//========================
// CONTROLS

// number of cells
Nx   50;
NRinner   20;
NRouter   25;

// size ratio of cell at the wall to the free-stream one in the near-wall blocks
expRatWall   0.05;

//========================

convertToMeters 1;

// all the vertices are in non-dimensional units
// pipe assumed to have length and radius of 1
vertices
(
    (0.00000e+00 0.00000e+00 0.00000e+00)
	(0.00000e+00 0.00000e+00 8.00000e-01)
	(0.00000e+00 0.00000e+00 1.00000e+00)
	(0.00000e+00 6.10535e-01 6.10532e-01)
	(0.00000e+00 8.00000e-01 0.00000e+00)
	(0.00000e+00 1.00000e+00 0.00000e+00)
	(0.00000e+00 7.07107e-01 7.07107e-01)

	(1 0.00000e+00 0.00000e+00)
	(1 0.00000e+00 8.00000e-01)
	(1 0.00000e+00 1.00000e+00)
	(1 6.10535e-01 6.10532e-01)
	(1 8.00000e-01 0.00000e+00)
	(1 1.00000e+00 0.00000e+00)
	(1 7.07107e-01 7.07107e-01)
);

blocks
(
    hex (0 7 11 4 1 8 10 3) ($Nx $NRinner $NRinner) simpleGrading (1 1 1)
    hex (4 11 12 5 3 10 13 6) ($Nx $NRouter $NRinner) simpleGrading (1 $expRatWall 1)
    hex (3 10 13 6 1 8 9 2) ($Nx $NRouter $NRinner) simpleGrading (1 $expRatWall 1)
);

edges
(
	BSpline 1 3 (
		//(0.00000e+00 0.00000e+00 8.00000e-01)
		(0.00000e+00 1.12269e-01 7.92025e-01)
		(0.00000e+00 2.22463e-01 7.62587e-01)
		(0.00000e+00 3.26692e-01 7.24996e-01)
		(0.00000e+00 4.21177e-01 6.86516e-01)
		(0.00000e+00 5.02076e-01 6.52300e-01)
		(0.00000e+00 5.66526e-01 6.25913e-01)
		(0.00000e+00 6.10535e-01 6.10532e-01)
	)
	
	BSpline 3 4 (
		(0.00000e+00 6.10532e-01 6.10535e-01)
		(0.00000e+00 6.25913e-01 5.66526e-01)
		(0.00000e+00 6.52300e-01 5.02076e-01)
		(0.00000e+00 6.86516e-01 4.21177e-01)
		(0.00000e+00 7.24996e-01 3.26692e-01)
		(0.00000e+00 7.62587e-01 2.22463e-01)
		(0.00000e+00 7.92025e-01 1.12269e-01)
		//(0.00000e+00 8.00000e-01 0.00000e+00)
	)
	BSpline 8 10 (
		//(1 0.00000e+00 8.00000e-01)
		(1 1.12269e-01 7.92025e-01)
		(1 2.22463e-01 7.62587e-01)
		(1 3.26692e-01 7.24996e-01)
		(1 4.21177e-01 6.86516e-01)
		(1 5.02076e-01 6.52300e-01)
		(1 5.66526e-01 6.25913e-01)
		(1 6.10535e-01 6.10532e-01)
	)
	
	BSpline 10 11 (
		(1 6.10532e-01 6.10535e-01)
		(1 6.25913e-01 5.66526e-01)
		(1 6.52300e-01 5.02076e-01)
		(1 6.86516e-01 4.21177e-01)
		(1 7.24996e-01 3.26692e-01)
		(1 7.62587e-01 2.22463e-01)
		(1 7.92025e-01 1.12269e-01)
		//(1 8.00000e-01 0.00000e+00)
	)
	
	arc 2 6 (0 0.38268343236508978 0.92387953251128674)
	arc 6 5 (0 0.92387953251128674 0.38268343236508978)
	
	arc 9 13 (1 0.38268343236508978 0.92387953251128674)
	arc 13 12 (1 0.92387953251128674 0.38268343236508978)
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (1 2 6 3)
            (3 6 5 4)
            (0 1 3 4)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (11 10 8 7)
            (12 13 10 11)
            (13 9 8 10)
        );
    }
    pipe
    {
        type wall;
        faces
        (
            (9 13 6 2)
            (13 12 5 6)
        );
    }
    symmetryVer
    {
        type symmetryPlane;
        faces
        (
            (2 9 8 1)
            (1 8 7 0)
        );
    }
    symmetryHor
    {
        type symmetryPlane;
        faces
        (
            (11 4 0 7)
            (12 5 4 11)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
